package day09API.stream;

import java.io.DataOutputStream;
import java.io.FileOutputStream;

/**
 * @author DBX
 * @effect
 * @date 2021/8/28 0028 - 16:04
 */
public class DOSDemo {
    public static void main(String[] args)throws Exception {
        DataOutputStream dos = new DataOutputStream(new FileOutputStream("File/date"));
        byte b= 100;
        short s = 102;
        char c = 'a';
        int i = 103;
        long l = 1004l;
        float f = 2.42431f;
        double d = 2.342;
        boolean sex = false;
        dos.writeByte(b);
        dos.writeShort(s);
        dos.writeChar(c);
        dos.writeInt(i);
        dos.writeLong(l);
        dos.writeFloat(f);
        dos.writeDouble(d);
        dos.writeBoolean(sex);
        dos.close();

    }
}
